//package com.item.wersocket;
//
//import org.springframework.context.annotation.Configuration;
//import org.springframework.messaging.converter.MessageConverter;
//import org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver;
//import org.springframework.messaging.handler.invocation.HandlerMethodReturnValueHandler;
//import org.springframework.messaging.simp.config.ChannelRegistration;
//import org.springframework.messaging.simp.config.MessageBrokerRegistry;
//import org.springframework.web.socket.config.annotation.*;
//
//import java.util.List;
//
//
//@Configuration
//@EnableWebSocketMessageBroker
//public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {
//
//    @Override
//    public void registerStompEndpoints(StompEndpointRegistry registry) {
//        registry.addEndpoint("/ws").withSockJS();
//    }
//
//
//    @Override
//    public void configureMessageBroker(MessageBrokerRegistry registry) {
//        registry.setApplicationDestinationPrefixes("/app");
//        registry.enableSimpleBroker("/topic");
//    }
//}
//
////@Configuration
////@EnableWebSocketMessageBroker//注解使用STOMP协议传输基于代理消息
////public class WebSocketConfig  extends AbstractWebSocketMessageBrokerConfigurer {
////    //注册STOMP协议节点，同时指定使用SockJS协议。
////    @Override
////    public void registerStompEndpoints(StompEndpointRegistry registry) {
////        registry.addEndpoint("/ws").setAllowedOrigins("*").withSockJS();
////    }
////    //由于我们是实现推送功能，这里的消息代理是/topic
////    @Override
////    public void configureMessageBroker(MessageBrokerRegistry config) {
//////启动STOMP 代理中继功能，并将其代理目的地前缀设置为 "/queue"
////        config.setApplicationDestinationPrefixes("/app");
////        config.enableSimpleBroker("/topic");
//////应用程序开头
//////config.setApplicationDestinationPrefixes("/app");
////
////    }
////}